﻿using log4net;

namespace FileManager_Server.Utility
{
    public sealed class LogLoader
    {
        private static readonly LogLoader Loader = new LogLoader();

        static LogLoader()
        {
            try
            {

            }
            catch
            {
            }
        }

        LogLoader()
        {
            try
            {
                log4net.Config.XmlConfigurator.Configure();
                //   var stackTrace = new StackTrace(new StackFrame(1,true));
                //Log = LogManager.GetLogger(stackTrace.GetFrame(0).GetFileName());
                Log = LogManager.GetLogger(typeof(LogLoader));
            }
            catch
            {
            }
        }

        public static LogLoader Instance
        {
            get { return Loader; }
        }

        public ILog Log { get; private set; } //protected static readonly ILog log = LogManager.GetLogger(ConfigSectionName);
    }
}